package cn.da.shuai.cool.finance.service;

import cn.da.shuai.cool.finance.model.CoolAccountsReceivable;
import cn.da.shuai.cool.mybatis.service.ICoolService;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;

public interface ICoolAccountsReceivableService extends ICoolService<CoolAccountsReceivable> {

    boolean recordReceivable(CoolAccountsReceivable receivable);

    boolean recordPayment(String invoiceNo, BigDecimal amount, String paymentReference);

    List<CoolAccountsReceivable> getOverdueReceivables();

    Map<String, Object> getAgingAnalysis();

    BigDecimal getCustomerBalance(Long customerId);

    List<Map<String, Object>> getReceivablesTrend(LocalDate startDate, LocalDate endDate);

    boolean writeOff(String invoiceNo, String reason);

    Map<String, Object> getCollectionEfficiencyReport();
}